<?php


namespace App\Http\Controllers\Api\v1;


use App\common;
use App\Http\Controllers\Controller;
use App\Logic\BrokerageLogic;
use App\Models\Brokerage;
use Illuminate\Http\Request;


class BrokerageController
{
    public function brokerList()
    {
        try {

            $data = BrokerageLogic::brokerList();
            return common::success('20000', $data, '经纪人展示成功');
        } catch (\Exception $exception) {
            return common::fail(201, '', $exception->getMessage());
        }
    }


    public function brokerDetail(Request $request)
    {
        try {
            $id = $request->get('id');
            $data =Brokerage::getOne($id);
            return  common::success(20000,'',$data);
        } catch (\Exception $exception) {
            return common::fail(201, '', $exception->getMessage());
        }

    }
}
